<html xmlns="http://www.w3.org/1999/xhtml"  
     xmlns:h="http://java.sun.com/jsf/html"      
      xmlns:f="http://java.sun.com/jsf/core"
     xmlns:p="http://primefaces.org/ui"
     xmlns:ui="http://java.sun.com/jsf/facelets">
 <h:head><title>Welcome to OTV_JSF_Spring_Hibernate_Project</title></h:head>  
 <h:body>


     <ui:composition template="/pages/common/loginLayout.xhtml">

         <ui:define name="content">
             <h:form>
                 <table>

                     <tr>
                         <td><h:outputLabel for="firstName" value="UserName : " /></td>
                         <td><p:inputText id="firstName" value="#{loginBean.username}">
                             <f:validateLength minimum="5" />
                             <p:ajax event="blur" update="firstNameMsg" />
                         </p:inputText>
                             <p:message id="firstNameMsg" for="firstName" display="icon"/>
                         </td>
                     </tr>
                     <tr>
                         <td><h:outputLabel for="lastName" value="Password : " /></td>
                         <td><p:inputText id="lastName" value="#{loginBean.password}">
                             <f:validateLength minimum="5" />
                             <p:ajax event="blur" update="lastNameMsg" />
                         </p:inputText>
                             <p:message id="lastNameMsg" for="lastName" display="icon"/>
                         </td>
                     </tr>

                     <tr>
                         <td><p:commandButton id="addUser" value="Login" action="#{loginBean.login}" ajax="false"/></td>
                         <td><p:commandButton id="reset" value="Reset" action="#{loginBean.reset}" ajax="false"/></td>
                     </tr>
                 </table>
             </h:form>
         </ui:define>


     </ui:composition>
</h:body>
</html> 